<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>复习Javascript</title>
</head>
<body>
    <h1>单击事件显示日期</h1>
    <p id="demo">这个是日期显示的例子</p>
    <button type="button" onclick="displayDate()">显示日期</button>
</body>
<script>
    function displayDate() {
        document.getElementById("demo").innerHTML = Date();
    }
    
</script>
</html>
